package com.ct.musicserver.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MusicStatusEnum {
    RUNNING(1, "存在"),
    DISABLE(0, "已删除");

    private final Integer code;
    private final String message;

    public MusicStatusEnum forName(String message) {
        for (MusicStatusEnum musicStatusEnum : MusicStatusEnum.values()) {
            if (message.equalsIgnoreCase(musicStatusEnum.name())) {
                return musicStatusEnum;
            }
        }
        return null;
    }
}
